var menulinks = new Array();

<{foreach key=key value=item from=$menulinks}>
menulinks[<{$key}>] = "<{foreach key=linkkey value=linkitem from=$item}><{if $linkitem[2] eq true}>&nbsp;&nbsp;&nbsp;&nbsp;<{/if}><a href='<{$linkitem[1]}>' title='<{$linkitem[0]}>'<{if $linkitem[4][0] neq ""}>id='link<{$linkitem[4][0]}>' onClick=\"javascript:<{if $linkitem[4][2] != ""}>if (<{$linkitem[4][2]}>) {<{/if}>CustomPopup('<{$linkitem[4][0]}>', event, \'link<{$linkitem[4][0]}>\', \'<{$linkitem[4][0]}>\');this.blur();<{if $linkitem[4][2] != ""}>}<{/if}>\" onMouseUp=\"this.blur();\"<{/if}>><{$linkitem[0]}><{if $linkitem[4][0] neq ""}>&nbsp;<img src='<{$themepath}>menudrop.gif' border='0' /><{/if}></a><{if $linkitem[3] eq true}>&nbsp;&nbsp;&nbsp;&nbsp; |<{/if}><{/foreach}>";
<{/foreach}>

function preloadMenuImages() {
	preloadImages('<{$themepath}>loadingcircle.gif', '<{$themepath}>menusection1.gif', '<{$themepath}>menusection2.gif', '<{$themepath}>menusection3.gif', '<{$themepath}>menusection4.gif', '<{$themepath}>menusection5.gif', '<{$themepath}>menusection6.gif', '<{$themepath}>menusection7.gif', '<{$themepath}>menusection8.gif', '<{$themepath}>menusection9.gif', '<{$themepath}>menusection10.gif', '<{$themepath}>tablebg.gif', '<{$themepath}>tabledescbg.gif', '<{$themepath}>menudrop.gif');
}